package com.jiyun.feign;

import com.github.pagehelper.PageInfo;
import com.jiyun.vo.Result;
import com.jiyun.vo.day15.TraineeDto;
import com.jiyun.vo.day15.TraineeVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author yangYingJie
 * @Date 2023/8/23 19：28
 **/
@FeignClient("day15-trainee")
public interface FeignTrainee {
    @RequestMapping("/traineeMember/findCount")
    public Result findCount(@RequestBody TraineeDto dto);

    @RequestMapping("/traineeMember/findCount2")
    public Result findCount2(@RequestBody TraineeDto dto);

    @RequestMapping("/traineeMember/findNum")
    public Integer findNum(@RequestBody TraineeDto dto);

    @RequestMapping("/trainee/findReTrainee")
    public List<TraineeVo> findReTrainee();

    //查询培训信息所有详细信息
    @RequestMapping("/trainee/findCAll")
    public PageInfo<TraineeVo> findCAll(@RequestBody TraineeDto dto);

    @RequestMapping("/traineeMember/addTraineeMember/{id}")
    public void addTraineeMember(@PathVariable("id") String id);

    /**
     * 当前登录人报名培训
     */
    @RequestMapping("/trainee/addById/{id}")
    public void addById(@PathVariable("id") String id);

    /**
     * 查询单个培训详情，
     * 当前登录人是否报名
     */
    @RequestMapping("/trainee/findById/{id}")
    public TraineeVo findById(@PathVariable("id") String id);


}
